/**************************************************************************************
 *  Copyright (c)  2010  Leszek Karcz.
 *  Permission is granted to copy, distribute and/or modify this document
 *  under the terms of the GNU Free Documentation License, Version 1.3
 *  or any later version published by the Free Software Foundation;
 *  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
 *  A copy of the license is included in the section entitled "GNU
 *  Free Documentation License". 
 **************************************************************************************/
package view;
import java.awt.*;
import javax.swing.*;

import data.*;

/**************************************************************************************
 * Author(s): Leszek Karcz
 * This class displays the gameplay background
 **************************************************************************************/
public class GameplayGuiTop extends JPanel
{
	private static final long serialVersionUID = 8281725891834469668L;
	private Images images;
	private int w,h,x,y;

	/**************************************************************************************
	 * Author(s): Leszek Karcz
	 * GameplayBackground constructor
	 **************************************************************************************/
	public GameplayGuiTop(Images images)
	{
		this.images=images;
		this.setFocusable(false);
		this.setOpaque(false);
		
		this.setLocation(0, 0);
		w = 1024;
		h = 600;
		x=0;
		y=0;
		
		this.setSize(w, h);
		this.setLocation(x, y);
	}

	/**************************************************************************************
	 * Author(s): Leszek Karcz
	 * paints/repaints the gameplay gui top
	 **************************************************************************************/
	public void paint(Graphics g)
	{
		this.setSize(w, h);
		this.setLocation(x, y);
		
		g.drawImage(images.getImage("gui_gameplay_top"), 0, 0, this);
	}
}
